package com.mjh.zhujianju.controller.set;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.livew.framework.base.controller.BaseController;
import com.livew.framework.base.service.BaseService;
import com.livew.framework.pojo.AjaxResult;
import com.livew.framework.utils.XTCurrentUser;
import com.mjh.zhujianju.model.set.PermissionEO;
import com.mjh.zhujianju.service.set.PermissionService;
import com.mjh.zhujianju.vo.set.PermissionVO;

@Controller
@RequestMapping("set/permission")
public class PermissionController extends BaseController<PermissionEO> {

	@Resource
	private PermissionService permissionService;

	@Override
	protected BaseService<PermissionEO> getService() {
		return permissionService;
	}
	
	
	/**
	 * 
	 * @return
	 */
	@RequestMapping(value="getPermission",method=RequestMethod.POST)
	@ResponseBody
	public  AjaxResult  getPermissionList(Long userId) {
		
		List<PermissionVO> list = permissionService.getAll(userId);
		return AjaxResult.getResult(list);
	}
}
